package org.exez.modules.visitor.constant;

/**
 * 单位预留时间类型
 *
 * @author dtm
 */
public enum ReserveTypeEnum {
    JTSJ("具体时间", 1),
    SXW("上下午", 2),
    QT("全天", 3);
    private String name;
    private Integer index;

    private ReserveTypeEnum(String name, Integer index) {
        this.name = name;
        this.index = index;
    }

    public static String getName(Integer index) {
        for (ReserveTypeEnum c : ReserveTypeEnum.values()) {
            if (c.getIndex().equals(index)) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

}
